package com.beidouapp.mapper;

import java.util.List;
import java.util.Map;

import com.beidouapp.domain.pojo.User;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;

import com.beidouapp.domain.example.EmployeeExample;
import com.beidouapp.domain.pojo.Employee;
import com.beidouapp.domain.vo.OrgRoleEmployeeVO;

public interface EmployeeMapper extends BaseMapper<Employee>{

    Employee getEmployeeByUserId(@Param("userId") Long userId);

    /**
     * 查询指定角色下所有的员工.
     * @param roleId
     * @return
     */
    public List<Employee> findEmployeeListByRoleId(@Param("roleId") Long roleId);

    /**
     * 查询员工列表
     * @param params
     * @param rowBounds
     * @return
     */
    public List<OrgRoleEmployeeVO> findOrgRoleEmployeesByMap(RowBounds rowBounds, Map<String, Object> params);

    public Integer findCountOrgRoleEmployees(Map<String, Object> params);

    public OrgRoleEmployeeVO getEmployeeVOById(@Param("empId") Long empId);

    public int removeEntryByID(@Param("id") Long id);


    //--------------


    Employee getEmployeeById(Long id);

    int countByExample(EmployeeExample example);

    int deleteByExample(EmployeeExample example);

    int insert(Employee record);

    int insertSelective(Employee record);

    List<Employee> selectByExample(EmployeeExample example);

    int updateByExampleSelective(@Param("record") Employee record, @Param("example") EmployeeExample example);

    int updateByExample(@Param("record") Employee record, @Param("example") EmployeeExample example);
    
    int updateByPrimaryKeySelective(Employee record);

    int updateByPrimaryKey(Employee record);
    

}